package com.heima.article.controller.v1;

import com.heima.article.service.ArticleConllectionService;
import com.heima.model.behavior.dtos.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/api/v1")
public class ArticleConllectionController {
    @Autowired
    private ArticleConllectionService articleConllectionService;

    @PostMapping("/collection_behavior")
    public ResponseResult handlerCollectionBehavior(@RequestBody CollectionBehaviorDto dto) {
        log.info("用户收藏行为入参:{}", dto);
        //调用service

        return articleConllectionService.handlerCollectionBehavior(dto);
    }
}
